home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / c01lab1.zip / ADAWKBK / SOL1-4.ADA < prev    next >
Text File  |  1992-11-11  |  460b  |  21 lines

  1. -- Problem 1.4
  2. -- by Rick Conn
  3. with text_io;
  4. procedure Display_ASCII is
  5.   package Int_IO is new Text_IO.Integer_IO (Integer);
  6.  
  7. begin -- Display_ASCII
  8.  
  9.   for I in ASCII.NUL .. ASCII.SUB loop
  10.  
  11.     Text_IO.Put ("Value: ");
  12.     Int_IO.Put (Character'Pos(I), 3);
  13.       -- the attribute 'Pos converts a character into
  14.       -- its position number (value) in the ASCII
  15.       -- character set
  16.     Text_IO.New_Line;
  17.  
  18.   end loop;
  19.  
  20. end Display_ASCII;
  21.